{% extends '::layout.html.twig' %}

{% block content_title %}Crear Persona{% endblock %}

{% block content_info %}
    <form action="{{ path('persona_create') }}" method="post" {{ form_enctype(form) }}>

        <div class="span6">
            <div class="field">
                <div class="error">{{ form_errors(form.nombre) }}</div>
                {{ form_widget(form.nombre, {'attr' : {
                    'tabindex': 1,
                    'placeholder': 'Nombre'
                }}) }}
            </div>

            <div class="field">
                <div class="error">{{ form_errors(form.foto) }}</div>
                {{ form_widget(form.foto, {'attr':{
                    'tabindex': 2,
                    'placeholder': 'Foto'
                }}) }}
            </div>
            {#/.span6#}
        </div>

        <div class="span6">
            <div class="field">
                <div class="error">{{ form_errors(form.direccion) }}</div>
                {{ form_widget(form.direccion, {'attr':{
                    'tabindex': -1,
                    'placeholder': 'Dirección'
                }}) }}
            </div>

            <div class="field">
                <div class="error">{{ form_errors(form.dir_trabajo) }}</div>
                {{ form_widget(form.dir_trabajo, {'attr':{
                    'tabindex': -1,
                    'placeholder': 'Dirección del Trabajo'
                }}) }}
            </div>
            {#/.span6#}
        </div>

        <div class="clearfix"></div>

        {{ form_widget(form) }}
        <p>
            <button type="submit" class="button blue">Crear</button>
        </p>
    </form>

    <ul class="record_actions">
        <li>
            <a href="{{ path('persona') }}">
                Back to the list
            </a>
        </li>
    </ul>
{% endblock %}
